home *** CD-ROM | disk | FTP | other *** search
Text File | 2005-01-11 | 40.5 KB | 1,293 lines |
- ;IMPORTANT: Network Associates provides this SuperDAT script file to
- ;you "as is," without any warranty, express or implied, including but
- ;not limited to implied warranties of merchantability or fitness for
- ;a particular purpose. You assume responsibility for using this script
- ;to achieve your intented results. Furthermore, you agree that Network
- ;Associates has no duty or responsibility to ensure the correct
- ;operation or performance of any script file that you create, generate,
- ;edit, or alter for use with the SuperDAT utility software Network
- ;Associates provides.
- ;
- ;SCRIPTDESC Update DATs and engine files
- ;Reboot and Silent are parameters that can be called from the command
- ;line once the binary has been compiled.
- ;Scope of Variables is global
- ;
- ;--------------------- Global Variables-----------------------------
- ;Section name must be 'ThisPackage'. It is case sensitive.
- [ThisPackage]
- ;DatDate, DatVersion, NTDatDate, NTDatVersion, EngineVersion,
- ;and NTEngineVersion variables are defined in Globals.nsg
- IncludeGlobals Globals.nsg
- Set FirstProductVersion=403
- Set FirstGSDVersion=5.0.107.0
- Set FirstVSEVersion=7.0.0.0
- Set FirstPSHVersion=1.0.0.0
- Set FirstGSEVersion=6.0.0.0
- Set FirstSSHVersion=1.0.0.0
- Set TempEngineVer=4002
- Set TRUE=1
- Set FALSE=0
- Call InitSettings
-
- ;--------------------- Product Checks --------------------------------
- ;Section name must be 'Main'. It is case sensitive.
- [Main]
- Call FindCmdLineScanner
-
- Call FindVirusScan98
-
- Call FindVirusScanNT
-
- Call FindVirusScanNTSoly
-
- Call FindNetShieldNT
-
- Call FindNetShieldNTSoly
-
- Call FindGroupShieldExchange
-
- Call FindWebShieldSMTP
-
- Call FindVirusScan450AndLater
-
- Call FindNetShield450AndLater
-
- Call FindWebShieldSMTP450AndLater
-
- Call FindGroupShieldDomino
-
- Call FindPortalShield
-
- Call FindSecurityShield
-
- ;------------------------- Read Settings from Application----------------
- [InitSettings]
- IsForceSwitchSet bForceUpdate
- GetOsType szOSType
-
- [ValidFilterOptions]
- IsValidFilter bFilter=FilterOption
- return bFilter==TRUE
-
- ;--------------------------- CmdLine Scanner ---------------------------
- [FindCmdLineScanner]
- ; --- GetScanUtilsPath looks for the appropriate command line scan binaries.
- ; --- It traverses through the Environment variable "PATH" to do this.
- ; --- Therefore, the NAI binaries will have to be somewhere within the path.
- Set FilterOption = CMNDLINE_FILES
- ContinueIf ValidFilterOptions
- GetScanUtilsPath szDir
- SetWorkDir szDir
- ContinueIf 4XVersionCheck
- SetFinalStatusFlag bStatus = 2
- Call CmdLineDatUpdate
- Call CmdLineEngineUpdate
- Call CopySdatPackFile
-
- [CmdLineDatUpdate]
- ContinueIf DatUpdateCheck
- SetBackupDir szBackDir = OldDats
- Call CopyDatFiles
-
- [CmdLineEngineUpdate]
- ContinueIf CmdLineEngineCheck
- SetBackupDir szBackDir = OldEng
- Call CopyCommandLineFiles
- Call EngineDats
-
- [CmdLineEngineCheck]
- Call ScanOlderCheck
- IsCurrentFileOlder bOlderScanPM = SCANPM.EXE
- return bOlderScan == TRUE | bOlderScanPM == TRUE | bForceUpdate == TRUE
-
- [ScanOlderCheck]
- FileExists bFound = SCAN.EXE
- Set bOlderScan = FALSE
- ContinueIf FoundCheck
- IsCurrentFileOlder bOlderScan = SCAN.EXE
-
-
- ;--------------------- VirusScan 98 --------------------------------
- [FindVirusScan98]
- ContinueIf PlatformWin32_9XCheck
- ContinueIf ProcessorX86_Check
- Set FilterOption = WIN9X_FILES
- ContinueIf ValidFilterOptions
- FindRegKey HKLM\SOFTWARE\McAfee\Scan95
- ContinueIf 9XProd4XCheck
- GetRegValue szDir = HKLM\SOFTWARE\McAfee\Scan95 , szProductLocation
- SetWorkDir szDir
- ;Set flag to product upto date
- SetFinalStatusFlag bStatus = 2
- Call 9XDatUpdate
- Call 9XEngineUpdate
- Call CopySdatPackFile
-
- [9XProd4XCheck]
- GetRegValue Ver = HKLM\SOFTWARE\McAfee\Scan95 , CurrentVersionNumber
- return FirstProductVersion <= Ver
-
- ;--V98 Dat Section --
- [9XDatUpdate]
- ContinueIf DatUpdateCheck
- SetBackupDir szBackDir = OldDats
- ExtractFileSet SCAN.DAT, NAMES.DAT, CLEAN.DAT
- Call V98CloseApps
- Call CopyDatFiles
- InstallFiles InterNetDAT
- Call DatCorporateRegSet
- SetRegValue HKLM\SOFTWARE\McAfee\Scan95, DATFile = DatVersion
- Call Dat402AndLaterRegSet
- Call UpdateCommonDATLocationRegistryValues
- Call RestartV98Apps
-
- ;--- V98 Engine Version Checking ---
- [9XEngineUpdate]
- Call DoRegistryCheck
- ContinueIf EngineUpdateCheck
- Call V98ProductVersionCheck
-
- ;----Create the key and value if not there
- [DoRegistryCheck]
- CreateRegKey HKLM\SOFTWARE\McAfee,VirusScan
- ContinueIf CheckEngineVersionValue
- SetRegValue HKLM\SOFTWARE\McAfee\VirusScan, szEngineVer = TempEngineVer
-
- [CheckEngineVersionValue]
- FindRegValue bEngVer = HKLM\SOFTWARE\McAfee\VirusScan , szEngineVer
- return bEngVer == FALSE
-
- ;--- Common V98 Components ---
- [V98ProductVersionCheck]
- SetBackupDir szBackDir = OldVXDs
- CanAllFilesBeCopied szLockedFiles = SCAN.DAT
- GetSystemDir szSysDir
- SetWorkDir szSysDir
- Call ProdV98_403
- Call CopyPsapiDLL
- SetWorkDir szDir
- SetBackupDir szBackDir = OldEngine
- Call CopyEngineFiles
- Call CopyExtraEngineFiles
- SetRegValue HKLM\SOFTWARE\McAfee\VirusScan, szEngineVer = EngineVersion
- Call EngRegV98CorporateSet
- Call UpdateCommonEngineLocationRegistryValues
- Set FilterOption = CMNDLINE_FILES
- ContinueIf ValidFilterOptions
- InstallFiles CommandLineSection
- Call FindViruFile
- Call EngineDats
-
- ;--- Registry Assignments ---
-
- [DatCorporateRegSet]
- FindRegKey HKLM\SOFTWARE\McAfee\VirusScan
- SetRegValue HKLM\SOFTWARE\McAfee\VirusScan, szVirDefDate = DatDate
- SetRegValue HKLM\SOFTWARE\McAfee\VirusScan, szVirDefVer = DatVersion
-
- [Dat402AndLaterRegSet]
- FindRegKey HKLM\SOFTWARE\Network Associates\VirusScan\CurrentVersion
- SetRegValue HKLM\SOFTWARE\Network Associates\VirusScan\CurrentVersion, szDatVer = NTDatVersion
-
- [EngRegV98CorporateSet]
- FindRegKey HKLM\SOFTWARE\Network Associates\VirusScan\CurrentVersion
- SetRegValue HKLM\SOFTWARE\Network Associates\VirusScan\CurrentVersion, szScanEngineVersion = EngineVersion
-
- [UpdateCommonDATLocationRegistryValues]
- FindRegKey HKLM\SOFTWARE\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx
- FindRegValue bDATVer = HKLM\SOFTWARE\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx, szVirDefVer
- ContinueIf FoundVirDefVer
- SetRegValue HKLM\SOFTWARE\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx, szVirDefVer=NTDatVersion
- SetRegValue HKLM\SOFTWARE\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx, szVirDefDate=NTDatDate
-
- [FoundVirDefVer]
- Return bDATVer == TRUE
-
- [UpdateCommonEngineLocationRegistryValues]
- FindRegKey HKLM\SOFTWARE\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx
- FindRegValue bEngineVer = HKLM\SOFTWARE\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx, szEngineVer
- ContinueIf FoundEngineVer
- SetRegValue HKLM\SOFTWARE\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx, szEngineVer = EngineVersion
-
- [FoundEngineVer]
- Return bEngineVer == TRUE
-
- ;--- VirusScan9X403 ---
- [ProdV98_403]
- ContinueIf V98_403Check
- InstallFiles VXD403Section
-
- [V98_403Check]
- return Ver == 4.0.3 | Ver == 4.0.3a | Ver == 4.0.3b | Ver == 4.0.3c
-
- ;--- Close Apps for Dat Update ---
- [V98CloseApps]
- IsAppRunning bVShield = VshieldWin_Class
- IsAppRunning bConsole = VirusScanConsoleWindowClass
- IsAppRunning bWebScanX = McAfeeWebScanX
- CloseNaiApps VirusScanConsoleWindowClass, NAI_VS_STAT, McAfeeWebScanX
- CloseNaiApps VshieldWin_Class, VirusScan
-
- ;--- Start Apps for Dat Update
- [RestartV98Apps]
- Call VshwinCheck
- Call WebScanxCheck
- Call AvconsoleCheck
-
- [AvconsoleCheck]
- ContinueIf ConsoleWasRunning
- StartNaiApps AVCONSOL.EXE
-
- [ConsoleWasRunning]
- return bConsole == TRUE
-
- [VshwinCheck]
- ContinueIf VShieldWasRunning
- StartNaiApps VSHWIN32.EXE
-
- [VShieldWasRunning]
- return bVShield == TRUE
-
- [WebScanxCheck]
- ContinueIf WebScanXWasRunning
- StartNaiApps WEBSCANX.EXE
-
- [WebScanXWasRunning]
- return bWebScanX == TRUE
-
- ;-------------------------FindVirusScan450AndLater---------------------------
- [FindVirusScan450AndLater]
- ContinueIf PlatformWin32_Check
- ContinueIf ProcessorX86_Check
- Call VirusScan450AndLater
- Call VirusScanTC
- Call FindVirusScan700AndLater
-
- [VirusScan450AndLater]
- FindRegKey HKLM\SOFTWARE\Network Associates\TVD\VirusScan
- GetRegValue Ver = HKLM\SOFTWARE\Network Associates\TVD\VirusScan , szCurrentVersionNumber
- ContinueIf VScanProd450Check
- GetRegValue szProdDir = HKLM\SOFTWARE\Network Associates\TVD\VirusScan, szInstallDir
- Set bTC = FALSE
- Call CommonVirusScan450AndLater
-
- [VirusScanTC]
- FindRegKey HKLM\SOFTWARE\Network Associates\TVD\VirusScan TC
- GetRegValue Ver = HKLM\SOFTWARE\Network Associates\TVD\VirusScan TC, szCurrentVersionNumber
- ContinueIf VScanProd450Check
- GetRegValue szProdDir = HKLM\SOFTWARE\Network Associates\TVD\VirusScan TC, szInstallDir
- Set bTC = TRUE
- Call CommonVirusScan450AndLater
-
- [FindVirusScan700AndLater]
- ContinueIf PlatformWin32_NTCheck
- LoadModule bComponent = MCAFEEPRODUCT, {451D30D1-C1EB-4891-BD3A-5FD7E3001784}
- Call VirusScanEnterprise
- UnloadModule bComponent = MCAFEEPRODUCT
-
- [VScanProd450Check]
- return FirstProductVersion <= Ver
-
- [CommonVirusScan450AndLater]
- ;Set flag to product upto date
- SetFinalStatusFlag bStatus = 2
- Call CheckAvSynchNTRunning
- Call CheckAvSynch9xRunning
- Set bServiceEnabled = TRUE
- GetRegValue szEngDir=HKLM\SOFTWARE\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx,szInstallDir
- SetWorkDir szEngDir
- Call VScanDatUpdate
- Call VScanEngineUpdate
- SetWorkDir szProdDir
- Call StartAvSyncMgrNT
- Call StartAvSyncMgr9X
- Call CopySdatPackFile
-
- [VirusScanEnterprise]
- FindRegKey HKLM\SOFTWARE\Network Associates\TVD\VirusScan Enterprise\CurrentVersion
- GetRegValue Ver = HKLM\SOFTWARE\Network Associates\TVD\VirusScan Enterprise\CurrentVersion, szProductVer
- ContinueIf VScanEnterpriseProd700Check
- GetRegValue szProdDir = HKLM\SOFTWARE\Network Associates\TVD\VirusScan Enterprise\CurrentVersion, szInstallDir
- Call VirusScan700AndLater
-
- [VScanEnterpriseProd700Check]
- Return FirstVSEVersion <= Ver
-
- [VirusScan700AndLater]
- Call UpdateVSE700DATs
- SetWorkDir szProdDir
- Call UpdateSVEEngineFiles
- SetWorkDir szProdDir
- Call CopySdatPackFile
-
- [UpdateVSE700DATs]
- GetProductInfo szDATDir = DAT, Location, STRING
- SetWorkDir szDATDir
- Call VirusScanEnterpriseDATUpdate
- ContinueIf CheckProductUpdated
- SetProductInfo bOK = DAT, Version, NTDatVersion, STRING
- SetProductInfo bOK = DAT, Date, DatDate, STRING
- Call UpdateCommonDATLocationRegistryValues
- NotifyProduct bNotify = STATE_POSTNOTIFY, DAT, DatVersion
- NotifyProduct bNotify = STATE_SUCCESS, DAT, NTDatVersion
-
- [UpdateSVEEngineFiles]
- GetProductInfo szEngDir = Engine, Location, STRING
- SetWorkDir szEngDir
- Call VirusScanEnterpriseEngineUpdate
- ContinueIf CheckProductUpdated
- SetProductInfo bOK = Engine, Version, EngineVersion, STRING
- Call UpdateCommonEngineLocationRegistryValues
- NotifyProduct bNotify = STATE_POSTNOTIFY, Engine, EngineVersion
- NotifyProduct bNotify = STATE_SUCCESS, Engine, NTEngineVersion
-
- [VirusScanEnterpriseDATUpdate]
- ;Set flag to product upto date
- SetFinalStatusFlag bStatus = 2
- ContinueIf DatUpdateCheckUsingGetProductInfo
- ;Set flag to product rejected update
- SetFinalStatusFlag bStatus = 7
- ContinueIf PreNotifyDATUpdate
- SetBackupDir szBackDir = OldDats
- ExtractFileSet SCAN.DAT,NAMES.DAT,CLEAN.DAT
- Call CopyDatFiles
- ContinueIf CheckProductNotUpdated
- NotifyProduct bNotify = STATE_FAIL, DAT, NTDatVersion
-
- [DatUpdateCheckUsingGetProductInfo]
- GetProductInfo DatVer = DAT, Version, STRING
- Return DatVer < DatVersion | bForceUpdate == TRUE
-
- [PreNotifyDATUpdate]
- Call PreNotifyForceDATUpdate
- Call PreNotifyNoForceDATUpdate
- Return bNotify == 0
-
- [PreNotifyForceDATUpdate]
- ContinueIf ForceUpdate
- NotifyProduct bNotify = STATE_PRENOTIFYFORCE, DAT, DatVersion
-
- [PreNotifyNoForceDATUpdate]
- ContinueIf NoForceUpdate
- NotifyProduct bNotify = STATE_PRENOTIFY, DAT, DatVersion
-
- [VirusScanEnterpriseEngineUpdate]
- ContinueIf EngineUpdateCheckUsingGetProductInfo
- ;Set flag to product rejected update
- SetFinalStatusFlag bStatus = 7
- ContinueIf PreNotifyEngineUpdate
- SetWorkDir szEngDir
- SetBackupDir szBackDir = OldEngine
- ExtractFileSet MCSCAN32.DLL
- Call CopyEngineFiles
- Call CopyExtraEngineFiles
- Call CopyPsapiDLL
- SetWorkDir szEngDir
- Call FullVirusScanEnterprise
- ContinueIf CheckProductNotUpdated
- NotifyProduct bNotify = STATE_FAIL, Engine, NTEngineVersion
-
- [EngineUpdateCheckUsingGetProductInfo]
- GetProductInfo EngVer = Engine, Version, STRING
- Return EngVer < NTEngineVersion | bForceUpdate == TRUE
-
- [PreNotifyEngineUpdate]
- Call PreNotifyForceEngineUpdate
- Call PreNotifyNoForceEngineUpdate
- Return bNotify == 0
-
- [PreNotifyForceEngineUpdate]
- ContinueIf ForceUpdate
- NotifyProduct bNotify = STATE_PRENOTIFYFORCE, Engine, EngineVersion
-
- [PreNotifyNoForceEngineUpdate]
- ContinueIf NoForceUpdate
- NotifyProduct bNotify = STATE_PRENOTIFY, Engine, EngineVersion
-
- [FullVirusScanEnterprise]
- Set FilterOption = CMNDLINE_FILES
- ContinueIf ValidFilterOptions
- InstallFiles CommandLineSection
- Call FindViruFile
- Call EngineDats
-
- [CheckAvSynch9xRunning]
- ContinueIf PlatformWin32_9XCheck
- IsAppRunning bAvSynch = VirusScanSynchMgrClass
-
- [CheckAvSynchNTRunning]
- ContinueIf PlatformWin32_NTCheck
- IsServiceRunning bAvSynch = Avsynmgr
-
- [VScanDatUpdate]
- ContinueIf DatUpdateCheck
- SetBackupDir szBackDir = OldDats
- ExtractFileSet SCAN.DAT,NAMES.DAT,CLEAN.DAT
- Call StopAvSyncMgrNT
- Call StopAvSyncMgr9X
- Call CopyDatFiles
- Call UpdateCommonDATLocationRegistryValues
- ContinueIf ProdIsNotVTC
- SetRegValue HKLM\SOFTWARE\Network Associates\TVD\VirusScan\AVConsol\General,bDisableRunStartup=TRUE
- SetWorkDir szProdDir
- InstallFiles InterNetDAT
-
- [VScanEngineUpdate]
- ContinueIf VScanEngineUpdateCheck
- SetWorkDir szEngDir
- SetBackupDir szBackDir = OldEngine
- ExtractFileSet MCSCAN32.DLL
- Call StopAvSyncMgrNT
- Call StopAvSyncMgr9X
- Call CopyEngineFiles
- Call CopyExtraEngineFiles
- Call CopyPsapiDLL
- SetWorkDir szEngDir
- Call UpdateCommonEngineLocationRegistryValues
- Call FullVScanOnly
- ContinueIf PlatformWin32_9XCheck
- SetBackupDir szBackDir = OldVxds
- GetSystemDir szSysDir
- SetWorkDir szSysDir
- InstallFiles VXD450Section
-
- [VScanEngineUpdateCheck]
- GetRegValue EngVer = HKLM\SOFTWARE\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx, szEngineVer
- return EngVer < NTEngineVersion | bForceUpdate == TRUE
-
- [FullVScanOnly]
- ContinueIf ProdIsNotVTC
- SetRegValue HKLM\SOFTWARE\Network Associates\TVD\VirusScan\AVConsol\General,bDisableRunStartup=TRUE
- Set FilterOption = CMNDLINE_FILES
- ContinueIf ValidFilterOptions
- InstallFiles CommandLineSection
- Call FindViruFile
- Call EngineDats
-
- [StopAvSyncMgr9X]
- ContinueIf PlatformWin32_9XCheck
- CloseNaiApps VirusScanSynchMgrClass
- WaitTillUnlocked MCSCAN32.DLL, 30000
-
- [StopAvSyncMgrNT]
- ContinueIf PlatformWin32_NTCheck
- ContinueIf AvSyncMgrWasRunning
- ContinueIf ServiceShouldBeDisabled
- DisableNaiServices Avsynmgr
- WaitTillUnlocked MCSCAN32.DLL, 30000
- Set bServiceEnabled = FALSE
-
- [StartAvSyncMgr9X]
- ContinueIf PlatformWin32_9XCheck
- ContinueIf AvSyncMgrWasRunning
- ContinueIf AvSyncMgrIsNotRunning
- StartNaiApps Avsynmgr.exe
-
- [StartAvSyncMgrNT]
- ContinueIf PlatformWin32_NTCheck
- ContinueIf AvSyncMgrWasRunning
- ContinueIf ServiceShouldBeEnabled
- EnableNaiServices Avsynmgr
- WaitForTime 2000
- Set bServiceEnabled = TRUE
-
- [AvSyncMgrWasRunning]
- return bAvSynch == TRUE
-
- [AvSyncMgrIsNotRunning]
- IsAppRunning bAvSynch = VirusScanSynchMgrClass
- return bAvSynch == FALSE
-
- [ProdIsNotVTC]
- return bTC == FALSE
- ;-------------------------- Vscan NT ----------------------------------
- [FindVirusScanNT]
- ContinueIf PlatformWin32_NTCheck
- ContinueIf ProcessorX86_Check
- FindRegKey HKLM\SOFTWARE\Network Associates\VirusScan NT
- Call NTProductUpdate
-
- [FindVirusScanNTSoly]
- ContinueIf PlatformWin32_NTCheck
- ContinueIf ProcessorX86_Check
- FindRegKey HKLM\SOFTWARE\Network Associates\Dr Solomon's VirusScan NT
- Call NTProductUpdate
- ;-------------------------- NetShield NT -------------------------------
- [FindNetShieldNT]
- ContinueIf PlatformWin32_NTCheck
- ContinueIf ProcessorX86_Check
- FindRegKey HKLM\SOFTWARE\Network Associates\NetShield NT
- Call NTProductUpdate
-
- [FindNetShieldNTSoly]
- ContinueIf PlatformWin32_NTCheck
- ContinueIf ProcessorX86_Check
- FindRegKey HKLM\SOFTWARE\Network Associates\Dr Solomon's NetShield NT
- Call NTProductUpdate
- ;-------------------------- NetShield NT 4.5.0------------------------------
- [FindNetShield450AndLater]
- ContinueIf PlatformWin32_NTCheck
- ContinueIf ProcessorX86_Check
- FindRegKey HKLM\SOFTWARE\Network Associates\TVD\NetShield NT
- ContinueIf NT450ProdCheck
- ;Set flag to product upto date
- SetFinalStatusFlag bStatus = 2
- IsServiceRunning bMcTaskMgr = McTaskManager
- IsServiceRunning bMcShield = McShield
- Set bServiceEnabled = TRUE
- GetRegValue szDir=HKLM\SOFTWARE\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx , szInstallDir
- SetWorkDir szDir
- Call NT450DatUpdate
- Call NT450EngineUpdate
- GetRegValue szDir = HKLM\SOFTWARE\Network Associates\TVD\NetShield NT\CurrentVersion, szInstallDir
- SetWorkDir szDir
- Call NTRestartApps
- Call CopySdatPackFile
-
- [NT450ProdCheck]
- GetRegValue Ver = HKLM\SOFTWARE\Network Associates\TVD\NetShield NT\CurrentVersion, szProductVer
- return FirstProductVersion <= Ver
-
- [NT450DatUpdate]
- ContinueIf DatUpdateCheck
- Call NTNewDatUpdate
- SetRegValue HKLM\SOFTWARE\Network Associates\TVD\NetShield NT\CurrentVersion, szVirDefDate = NTDatDate
- SetRegValue HKLM\SOFTWARE\Network Associates\TVD\NetShield NT\CurrentVersion, szVirDefVer = NTDatVersion
- Call UpdateCommonDATLocationRegistryValues
- Call EnableMcShieldService
-
- [NT450EngineUpdate]
- ContinueIf NTEngine450UpdateCheck
- Call NTCommonEngineUpdate
- SetRegValue HKLM\SOFTWARE\Network Associates\TVD\NetShield NT\CurrentVersion, szEngineVer = EngineVersion
- Call UpdateCommonEngineLocationRegistryValues
- Set FilterOption = CMNDLINE_FILES
- ContinueIf ValidFilterOptions
- InstallFiles CommandLineSection
- Call FindViruFile
- Call EngineDats
-
- [NTEngine450UpdateCheck]
- GetRegValue EngVer = HKLM\SOFTWARE\Network Associates\TVD\NetShield NT\CurrentVersion , szEngineVer
- return EngVer < NTEngineVersion | bForceUpdate == TRUE
- ;----------NT Common------------------------------------------
- [NTProductUpdate]
- ContinueIf NTProd4XCheck
- ;Set flag to product upto date
- SetFinalStatusFlag bStatus = 2
- IsServiceRunning bMcTaskMgr = McTaskManager
- IsServiceRunning bMcShield = McShield
- Set bServiceEnabled = TRUE
- GetRegValue szDir = HKLM\SOFTWARE\McAfee\VirusScan , szInstallDir
- SetWorkDir szDir
- Call NTDatUpdate
- Call NTEngineUpdate
- Call NTRestartApps
- Call CopySdatPackFile
-
- [NTProd4XCheck]
- GetRegValue Ver = HKLM\SOFTWARE\McAfee\VirusScan , szProductVer
- return FirstProductVersion <= Ver
-
- [NTDatUpdate]
- ContinueIf DatUpdateCheck
- Call NTOldDatUpdate
- SetRegValue HKLM\SOFTWARE\McAfee\VirusScan, szVirDefDate = NTDatDate
- SetRegValue HKLM\SOFTWARE\McAfee\VirusScan, szVirDefVer = NTDatVersion
- Call UpdateCommonDATLocationRegistryValues
- Call EnableMcShieldService
-
- [NTEngineUpdate]
- ContinueIf EngineUpdateCheck
- Call NTCommonEngineUpdate
- Call EngineDats
- SetRegValue HKLM\SOFTWARE\McAfee\VirusScan, szEngineVer = EngineVersion
- Call UpdateCommonEngineLocationRegistryValues
-
- ; This two functions are what were NTCommonDatUpdate.
- ; To work around 402 problems and 402->4.5 upgrade problems
- ; they need to be seperate. New can only be called from a
- ; 4.5 product.
- ; Old can only be called if 402 or 403 is present.
- [NTNewDatUpdate]
- SetBackupDir szBackDir = OldDats
- ExtractFileSet SCAN.DAT, NAMES.DAT, CLEAN.DAT
- Call DisableMcShieldService
- Call CheckToStopMcShield
- Call CopyDatFiles
-
- [NTOldDatUpdate]
- SetBackupDir szBackDir = OldDats
- ExtractFileSet SCAN.DAT, NAMES.DAT, CLEAN.DAT
- Call DisableMcShieldService
- Call CheckToStopMcShield
- Call CheckToStopMcShield402
- Call CopyDatFiles
-
-
-
- [NTCommonEngineUpdate]
- SetBackupDir szBackDir = OldEngine
- ExtractFileSet MCSCAN32.DLL
- CloseNaiApps VirusScan
- StopNaiServices McShield, McTaskManager
- Call CopyEngineFiles
- Call CopyExtraEngineFiles
- Call CopyPsapiDLL
- SetWorkDir szDir
-
- [NTRestartApps]
- Call CheckMcTaskManager
- Call CheckMcShield
-
- [CheckMcTaskManager]
- ContinueIf McTaskManagerWasRunning
- StartNaiServices McTaskManager
-
- [McTaskManagerWasRunning]
- return bMcTaskMgr == TRUE
-
- [CheckMcShield]
- ContinueIf McShieldWasRunning
- StartNaiServices McShield
-
- [McShieldWasRunning]
- return bMcShield == TRUE
-
- [CheckToStopMcShield]
- IsFileLocked bLocked = SCAN.DAT
- ContinueIf StopMcShieldCheck
- Call EnableMcShieldService
- StopNaiServices McShield, McTaskManager
-
- [StopMcShieldCheck]
- return bLocked == TRUE
-
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ; Treat 402 as a special case.
- ; This key, with "VirusScan" in it is present in VS402 and NS402
- [CheckToStopMcShield402]
-
- FindRegKey HKLM\SOFTWARE\McAfee\VirusScan
- GetRegValue 402Ver = HKLM\SOFTWARE\McAfee\VirusScan , szProductVer
- ContinueIf Is402
- Call EnableMcShieldService
- StopNaiServices McShield, McTaskManager
-
- [Is402]
- return 402Ver == 4.0.2
- ; Treat 402 as a special case.
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-
-
- [DisableMcShieldService]
- CloseNaiApps VirusScan
- ContinueIf McShieldWasRunning
- ContinueIf ServiceShouldBeDisabled
- DisableNaiServices McShield
- WaitTillUnlocked SCAN.DAT, 15000
- Set bServiceEnabled = FALSE
-
- [EnableMcShieldService]
- ContinueIf McShieldWasRunning
- ContinueIf ServiceShouldBeEnabled
- EnableNaiServices McShield
- WaitForTime 2000
- Set bServiceEnabled = TRUE
-
- [ServiceShouldBeDisabled]
- return bServiceEnabled == TRUE
-
- [ServiceShouldBeEnabled]
- return bServiceEnabled == FALSE
-
- ;------------------------------- GroupShield Exchange -------------------------
- [FindGroupShieldExchange]
- ContinueIf PlatformWin32_NTCheck
- ContinueIf ProcessorX86_Check
- Call GroupShieldExchangePre600
- Call GroupShieldExchange600AndLater
-
- [GroupShieldExchangePre600]
- FindRegKey HKLM\SOFTWARE\Network Associates\GroupShield Exchange
- FindRegKey HKLM\SYSTEM\CurrentControlSet\Services\AVExch32Service
- GetRegValue szProdDir = HKLM\SYSTEM\CurrentControlSet\Services\AVExch32Service, ImagePath
- NameStripFile szProdDir
- SetWorkDir szProdDir
- ContinueIf 4XVersionCheck
- SetFinalStatusFlag bStatus = 2
- Call GSEDATUpdate
- Call GSEEngineUpdate
- StartGSE
- Call CopySdatPackFile
-
- [GSEDATUpdate]
- ContinueIf DatUpdateCheck
- SetBackupDir szBackDir = OldDats
- ExtractFileSet SCAN.DAT, NAMES.DAT, CLEAN.DAT
- StopGSE
- Call CopyDatFiles
-
- [GSEEngineUpdate]
- ContinueIf Engine32OldCheck
- SetBackupDir szBackDir = OldEngine
- ExtractFileSet MCSCAN32.DLL, LICENSE.DAT, MESSAGES.DAT
- StopGSE
- Call CopyEngineFiles
- Call EngineDats
- Call CopyExtraEngineFiles
- Call CopyPsapiDLL
- SetWorkDir szProdDir
-
- [GroupShieldExchange600AndLater]
- LoadModule bComponent = MCAFEEPRODUCT, {5712C245-EB8D-4816-809A-81D78D7E9285}
- Call GroupShield
- UnloadModule bComponent = MCAFEEPRODUCT
-
- [GroupShield]
- FindRegKey HKLM\SOFTWARE\Network Associates\McAfee GroupShield\SystemState
- GetRegValue Ver = HKLM\SOFTWARE\Network Associates\McAfee GroupShield\SystemState, ProductVersion
- ContinueIf GroupShieldProdCheck
- FindRegKey HKLM\SOFTWARE\Network Associates\McAfee GroupShield
- GetRegValue szProdDir = HKLM\SOFTWARE\Network Associates\McAfee GroupShield, InstallPath
- Call GroupShield600AndLater
-
- [GroupShieldProdCheck]
- Return FirstGSEVersion <= Ver
-
- [GroupShield600AndLater]
- Call UpdateGSE600DATs
- SetWorkDir szProdDir
- Call UpdateGSEEngineFiles
- SetWorkDir szProdDir
- SetBackupDir szBackDir = OldPkLst
- Call CopySdatPackFile
-
- [UpdateGSE600DATs]
- Set bSectionUpdated = FALSE
- Call GroupShieldDATUpdate
- ContinueIf CheckProductUpdated
- ContinueIf CheckSectionUpdated
- SetProductInfo bOK = DAT, Version, DatVersion, STRING
- SetProductInfo bOK = DAT, Date, DatDate, STRING
- NotifyProduct bNotify = STATE_POSTNOTIFY, DAT, DatVersion
- NotifyProduct bNotify = STATE_SUCCESS, DAT, NTDatVersion
-
- [GroupShieldDATUpdate]
- ;Set flag to product upto date
- SetFinalStatusFlag bStatus = 2
- ContinueIf DatUpdateCheckUsingGetProductInfo
- ;Set flag to product rejected update
- SetFinalStatusFlag bStatus = 7
- ContinueIf PreNotifyDATUpdate
- GetProductInfo szDATDir = DAT, Location, STRING
- SetWorkDir szDATDir, CREATE
- ExtractFileSet SCAN.DAT,NAMES.DAT,CLEAN.DAT
- Call CopyDatFiles
- ContinueIf CheckProductNotUpdated
- NotifyProduct bNotify = STATE_FAIL, DAT, NTDatVersion
-
- [UpdateGSEEngineFiles]
- Set bSectionUpdated = FALSE
- Call GroupShieldEngineUpdate
- ContinueIf CheckProductUpdated
- ContinueIf CheckSectionUpdated
- SetProductInfo bNotify = Engine, Version, EngineVersion, STRING
- NotifyProduct bNotify = STATE_POSTNOTIFY, Engine, EngineVersion
- NotifyProduct bNotify = STATE_SUCCESS, Engine, NTEngineVersion
-
- [GroupShieldEngineUpdate]
- ContinueIf EngineUpdateCheckUsingGetProductInfo
- ;Set flag to product rejected update
- SetFinalStatusFlag bStatus = 7
- ContinueIf PreNotifyEngineUpdate
- GetProductInfo szEngDir = Engine, Location, STRING
- SetWorkDir szEngDir, CREATE
- ExtractFileSet MCSCAN32.DLL, SIGNLIC.TXT, LICENSE.DAT, MESSAGES.DAT
- Call CopyEngineFiles
- Call EngineDats
- ContinueIf CheckProductNotUpdated
- NotifyProduct bNotify = STATE_FAIL, Engine, NTEngineVersion
-
- ;------------------------------ WebShield SMTP --------------------------------
- [FindWebShieldSMTP]
- ContinueIf PlatformWin32_NTCheck
- ContinueIf ProcessorX86_Check
- FindRegKey HKLM\SOFTWARE\Network Associates\WebShield SMTP
- ContinueIf WShSMTPProd4XCheck
- GetRegValue szDir = HKLM\SOFTWARE\McAfee\WebShield SMTP\Mail Scan , Install_Path
- SetWorkDir szDir
- IsServiceRunning bMailCfg = mailcfg
- IsServiceRunning bMailScan = mailscan
- SetFinalStatusFlag bStatus = 2
- Call WebShieldDATUpdate
- Call WebShieldEngineUpdate
- Call WshStartServices
- Call CopySdatPackFile
-
- [WShSMTPProd4XCheck]
- FindRegKey HKLM\SOFTWARE\McAfee\WebShield SMTP
- GetRegValue Ver = HKLM\SOFTWARE\McAfee\WebShield SMTP, szMailScanVer
- return FirstProductVersion <= Ver
-
- [WebShieldDATUpdate]
- ContinueIf DatUpdateCheck
- SetBackupDir szBackDir = OldDats
- ExtractFileSet SCAN.DAT, NAMES.DAT, CLEAN.DAT
- StopNaiServices mailcfg, mailscan
- Call CopyDatFiles
- SetRegValue HKLM\SOFTWARE\McAfee\WebShield SMTP, szVirDefDate = DatDate
- SetRegValue HKLM\SOFTWARE\McAfee\WebShield SMTP, szVirDefVer = DatVersion
-
- [WebShieldEngineUpdate]
- ContinueIf WebShieldEngineUpdateCheck
- SetBackupDir szBackDir = OldEngine
- ExtractFileSet MCSCAN32.DLL, LICENSE.DAT, MESSAGES.DAT
- StopNaiServices mailcfg, mailscan
- Call CopyEngineFiles
- Call EngineDats
- Call CopyExtraEngineFiles
- Call CopyPsapiDLL
- SetWorkDir szDir
- SetRegValue HKLM\SOFTWARE\McAfee\WebShield SMTP, szEngineVer = EngineVersion
-
-
- [WebShieldEngineUpdateCheck]
- GetRegValue EngVer = HKLM\SOFTWARE\McAfee\WebShield SMTP, szEngineVer
- return EngVer < NTEngineVersion | bForceUpdate == TRUE
-
- [WshStartServices]
- Call MailScanService
- Call MailCfgService
-
- [MailScanService]
- ContinueIf WshMailScanStartCheck
- StartNaiServices mailscan
-
- [MailCfgService]
- ContinueIf WshMailCfgStartCheck
- StartNaiServices mailcfg
- ;--------------------------- WebShield SMTP 4.5.0----------------------
- [FindWebShieldSMTP450AndLater]
- ContinueIf PlatformWin32_NTCheck
- ContinueIf ProcessorX86_Check
- FindRegKey HKLM\SOFTWARE\Network Associates\TVD\WebShield SMTP
- GetRegValue szDir = HKLM\SOFTWARE\Network Associates\TVD\WebShield SMTP\MailScan, Install_Path
- SetWorkDir szDir
- ContinueIf 4XVersionCheck
- IsServiceRunning bMailCfg = WebShield SMTP MailCfg
- IsServiceRunning bMailScan = WebShield SMTP MailScan
- SetFinalStatusFlag bStatus = 2
- Call WebShield450DATUpdate
- Call WebShield450EngineUpdate
- Call Wsh450StartServices
- Call CopySdatPackFile
-
- [WebShield450DATUpdate]
- ContinueIf DatUpdateCheck
- SetBackupDir szBackDir = OldDats
- ExtractFileSet SCAN.DAT, NAMES.DAT, CLEAN.DAT
- StopNaiServices WebShield SMTP MailCfg, WebShield SMTP MailScan
- Call CopyDatFiles
- SetRegValue HKLM\SOFTWARE\Network Associates\TVD\WebShield SMTP, szVirDefDate = DatDate
- SetRegValue HKLM\SOFTWARE\Network Associates\TVD\WebShield SMTP, szVirDefVer = NTDatVersion
-
- [WebShield450EngineUpdate]
- ContinueIf WebShield450EngineUpdateCheck
- SetBackupDir szBackDir = OldEngine
- ExtractFileSet MCSCAN32.DLL, LICENSE.DAT, MESSAGES.DAT
- StopNaiServices WebShield SMTP MailCfg, WebShield SMTP MailScan
- Call CopyEngineFiles
- Call EngineDats
- Call CopyExtraEngineFiles
- Call CopyPsapiDLL
- SetWorkDir szDir
- SetRegValue HKLM\SOFTWARE\Network Associates\TVD\WebShield SMTP, szEngineVer = EngineVersion
-
-
- [WebShield450EngineUpdateCheck]
- GetRegValue EngVer = HKLM\SOFTWARE\Network Associates\TVD\WebShield SMTP, szEngineVer
- return EngVer < NTEngineVersion | bForceUpdate == TRUE
-
- [Wsh450StartServices]
- Call Wsh450MailScanService
- Call Wsh450MailCfgService
-
- [Wsh450MailScanService]
- ContinueIf WshMailScanStartCheck
- StartNaiServices WebShield SMTP MailScan
-
- [Wsh450MailCfgService]
- ContinueIf WshMailCfgStartCheck
- StartNaiServices WebShield SMTP MailCfg
- ;-------------------------- WebShield SMTP Common----------------------
- [WshMailScanStartCheck]
- return bMailScan == TRUE
-
- [WshMailCfgStartCheck]
- return bMailCfg == TRUE
-
- ;-----------------------------------GroupShieldDomino-----------------------
- [FindGroupShieldDomino]
- ContinueIf PlatformWin32_NTCheck
- ContinueIf ProcessorX86_Check
- FindAndInitGSD
- GetGSDInfo bUpdateGSD=GSD_UPDATE_OK
- ContinueIf OKToUpdateGSD
- GetGSDInfo szGSDEngVer=GSD_ENG_VER
- GetGSDInfo szGSDProdVer=GSD_PROD_VER
- GetGSDInfo szGSDDatEngLoc=GSD_ENG_LOC
- GetGSDInfo szGSDProdLoc=GSD_PROD_LOC
- ContinueIf MinimumVersionCheck
- SetWorkDir szGSDDatEngLoc
- SetFinalStatusFlag bStatus = 2
- call UpdateGroupShieldDats
- call UpdateGroupShieldEng
- StartGSD
- DeInitGSD
- SetWorkDir szGSDProdLoc
- Call CopySdatPackFile
-
- [OKToUpdateGSD]
- Return bUpdateGSD == 0
-
- [MinimumVersionCheck]
- return szGSDProdVer >= FirstGSDVersion
-
- [UpdateGroupShieldDats]
- ContinueIf DatUpdateCheck
- ExtractFileSet SCAN.DAT, NAMES.DAT, CLEAN.DAT
- StopGSD
- SetBackupDir szBackDir = OldDats
- Call CopyDatFiles
- SetGSDInfo GSD_DAT_VER=NTDatVersion
-
- [UpdateGroupShieldEng]
- ContinueIf GSDEngUpdateCheck
- ExtractFileSet MCSCAN32.DLL
- StopGSD
- SetBackupDir szBackDir = OldEngine
- Call CopyEngineFiles
- Call EngineDats
- Call CopyExtraEngineFiles
- Call CopyPsapiDLL
- SetGSDInfo GSD_ENG_VER=EngineVersion
-
- [GSDEngUpdateCheck]
- return szGSDEngVer < NTEngineVersion | bForceUpdate == TRUE
-
- ;-----------------------------------PortalShield-----------------------
- [FindPortalShield]
- ContinueIf PlatformWin32_NTCheck
- ContinueIf ProcessorX86_Check
- LoadModule bComponent = MCAFEEPRODUCT, {940F2A91-D23C-4BE3-8BD7-FBB5DC20BFF0}
- Call PortalShield
- UnloadModule bComponent = MCAFEEPRODUCT
-
- [PortalShield]
- FindRegKey HKLM\SOFTWARE\Network Associates\McAfee PortalShield\SystemState
- GetRegValue Ver = HKLM\SOFTWARE\Network Associates\McAfee PortalShield\SystemState, ProductVersion
- ContinueIf PortalShieldProdCheck
- FindRegKey HKLM\SOFTWARE\Network Associates\McAfee PortalShield
- GetRegValue szProdDir = HKLM\SOFTWARE\Network Associates\McAfee PortalShield, InstallPath
- Call PortalShield100AndLater
-
- [PortalShieldProdCheck]
- Return FirstPSHVersion <= Ver
-
- [PortalShield100AndLater]
- Call UpdatePSH100DATs
- SetWorkDir szProdDir
- Call UpdatePSHEngineFiles
- SetWorkDir szProdDir
- SetBackupDir szBackDir = OldPkLst
- Call CopySdatPackFile
-
- [UpdatePSH100DATs]
- Set bSectionUpdated = FALSE
- Call PortalShieldDATUpdate
- ContinueIf CheckProductUpdated
- ContinueIf CheckSectionUpdated
- SetProductInfo bOK = DAT, Version, DatVersion, STRING
- SetProductInfo bOK = DAT, Date, DatDate, STRING
- NotifyProduct bNotify = STATE_POSTNOTIFY, DAT, DatVersion
- NotifyProduct bNotify = STATE_SUCCESS, DAT, NTDatVersion
-
- [PortalShieldDATUpdate]
- ;Set flag to product upto date
- SetFinalStatusFlag bStatus = 2
- ContinueIf DatUpdateCheckUsingGetProductInfo
- ;Set flag to product rejected update
- SetFinalStatusFlag bStatus = 7
- ContinueIf PreNotifyDATUpdate
- GetProductInfo szDATDir = DAT, Location, STRING
- SetWorkDir szDATDir, CREATE
- ExtractFileSet SCAN.DAT,NAMES.DAT,CLEAN.DAT
- Call CopyDatFiles
- ContinueIf CheckProductNotUpdated
- NotifyProduct bNotify = STATE_FAIL, DAT, NTDatVersion
-
- [UpdatePSHEngineFiles]
- Set bSectionUpdated = FALSE
- Call PortalShieldEngineUpdate
- ContinueIf CheckProductUpdated
- ContinueIf CheckSectionUpdated
- SetProductInfo bNotify = Engine, Version, EngineVersion, STRING
- NotifyProduct bNotify = STATE_POSTNOTIFY, Engine, EngineVersion
- NotifyProduct bNotify = STATE_SUCCESS, Engine, NTEngineVersion
-
- [PortalShieldEngineUpdate]
- ContinueIf EngineUpdateCheckUsingGetProductInfo
- ;Set flag to product rejected update
- SetFinalStatusFlag bStatus = 7
- ContinueIf PreNotifyEngineUpdate
- GetProductInfo szEngDir = Engine, Location, STRING
- SetWorkDir szEngDir, CREATE
- ExtractFileSet MCSCAN32.DLL, SIGNLIC.TXT, LICENSE.DAT, MESSAGES.DAT
- Call CopyEngineFiles
- Call EngineDats
- ContinueIf CheckProductNotUpdated
- NotifyProduct bNotify = STATE_FAIL, Engine, NTEngineVersion
-
- ;-----------------------------------SecurityShield-----------------------
- [FindSecurityShield]
- ContinueIf PlatformWin32_NTCheck
- ContinueIf ProcessorX86_Check
- LoadModule bComponent = MCAFEEPRODUCT, {08446D7B-D44B-49b0-B676-1E433B17F3B8}
- Call SecurityShield
- UnloadModule bComponent = MCAFEEPRODUCT
-
- [SecurityShield]
- FindRegKey HKLM\SOFTWARE\Network Associates\McAfee SecurityShield for Microsoft ISA Server\SystemState
- GetRegValue Ver = HKLM\SOFTWARE\Network Associates\McAfee SecurityShield for Microsoft ISA Server\SystemState, ProductVersion
- ContinueIf SecurityShieldProdCheck
- FindRegKey HKLM\SOFTWARE\Network Associates\McAfee SecurityShield for Microsoft ISA Server
- GetRegValue szProdDir = HKLM\SOFTWARE\Network Associates\McAfee SecurityShield for Microsoft ISA Server, InstallPath
- Call SecurityShield100AndLater
-
- [SecurityShieldProdCheck]
- Return FirstSSHVersion <= Ver
-
- [SecurityShield100AndLater]
- Call UpdateSSH100DATs
- SetWorkDir szProdDir
- Call UpdateSSHEngineFiles
- SetWorkDir szProdDir
- SetBackupDir szBackDir = OldPkLst
- Call CopySdatPackFile
-
- [UpdateSSH100DATs]
- Set bSectionUpdated = FALSE
- Call SecurityShieldDATUpdate
- ContinueIf CheckProductUpdated
- ContinueIf CheckSectionUpdated
- SetProductInfo bOK = DAT, Version, DatVersion, STRING
- SetProductInfo bOK = DAT, Date, DatDate, STRING
- NotifyProduct bNotify = STATE_POSTNOTIFY, DAT, DatVersion
- NotifyProduct bNotify = STATE_SUCCESS, DAT, NTDatVersion
-
- [SecurityShieldDATUpdate]
- ;Set flag to product upto date
- SetFinalStatusFlag bStatus = 2
- ContinueIf DatUpdateCheckUsingGetProductInfo
- ;Set flag to product rejected update
- SetFinalStatusFlag bStatus = 7
- ContinueIf PreNotifyDATUpdate
- GetProductInfo szDATDir = DAT, Location, STRING
- SetWorkDir szDATDir, CREATE
- ExtractFileSet SCAN.DAT,NAMES.DAT,CLEAN.DAT
- Call CopyDatFiles
- ContinueIf CheckProductNotUpdated
- NotifyProduct bNotify = STATE_FAIL, DAT, NTDatVersion
-
- [UpdateSSHEngineFiles]
- Set bSectionUpdated = FALSE
- Call SecurityShieldEngineUpdate
- ContinueIf CheckProductUpdated
- ContinueIf CheckSectionUpdated
- SetProductInfo bNotify = Engine, Version, EngineVersion, STRING
- NotifyProduct bNotify = STATE_POSTNOTIFY, Engine, EngineVersion
- NotifyProduct bNotify = STATE_SUCCESS, Engine, NTEngineVersion
-
- [SecurityShieldEngineUpdate]
- ContinueIf EngineUpdateCheckUsingGetProductInfo
- ;Set flag to product rejected update
- SetFinalStatusFlag bStatus = 7
- ContinueIf PreNotifyEngineUpdate
- GetProductInfo szEngDir = Engine, Location, STRING
- SetWorkDir szEngDir, CREATE
- ExtractFileSet MCSCAN32.DLL, SIGNLIC.TXT, LICENSE.DAT, MESSAGES.DAT
- Call CopyEngineFiles
- Call EngineDats
- ContinueIf CheckProductNotUpdated
- NotifyProduct bNotify = STATE_FAIL, Engine, NTEngineVersion
-
- ;--------------------------- Common ----------------------------------
- [ProcessorX86_Check]
- GetProcessorType szProcessor
- return szProcessor == PROCESSOR_INTEL
-
- [PlatformWin32_9XCheck]
- return szOSType == WIN32_9X
-
- [PlatformWin32_NTCheck]
- return szOSType == WIN32_NTS | szOSType == WIN32_NTW
-
- [PlatformWin32_Check]
- return szOSType == WIN32_9X | szOSType == WIN32_NTS | szOSType == WIN32_NTW
-
- [PlatformDOSCheck]
- return szOSType == WIN16_DOS
-
- [DatUpdateCheck]
- Get4xDatVersion DatVer = SCAN.DAT
- return DatVer < DatVersion | bForceUpdate == TRUE
-
- [EngineUpdateCheck]
- FindRegKey HKLM\SOFTWARE\McAfee\VirusScan
- GetRegValue EngVer = HKLM\SOFTWARE\McAfee\VirusScan , szEngineVer
- return EngVer < NTEngineVersion | bForceUpdate == TRUE
-
- [Engine32OldCheck]
- IsCurrentFileOlder bOlderFile = MCSCAN32.DLL
- return bOlderFile == TRUE | bForceUpdate == TRUE
-
- [Engine16OldCheck]
- IsCurrentFileOlder bOlderFile = MCSCAN16.DLL
- return bOlderFile == TRUE | bForceUpdate == TRUE
-
- ;For 4x product Dat version should be >=4002
- [4XVersionCheck]
- Get4xDatVersion DatVer = SCAN.DAT
- return DatVer >= TempEngineVer
-
- [ForceUpdate]
- Return bForceUpdate == TRUE
-
- [NoForceUpdate]
- Return bForceUpdate == FALSE
-
- [FoundCheck]
- return bFound == TRUE
-
- [NotFoundCheck]
- return bFound == FALSE
-
- [CopyDatFiles]
- CanAllFilesBeCopied bDatUpdate = SCAN.DAT, NAMES.DAT, CLEAN.DAT
- InstallFiles DatSection
- SetFinalStatusFlag bStatus = 0
- Set bSectionUpdated = TRUE
-
- [CopyEngineFiles]
- CanAllFilesBeCopied bEngineUpdate = MCSCAN32.DLL
- InstallFiles Engine32Section
- SetFinalStatusFlag bStatus = 0
- Set bSectionUpdated = TRUE
-
- [CopyExtraEngineFiles]
- ContinueIf EngineIs4050OrGreater
- Call CopyAvparamDLL
- Call CopyRwabs16DLL
- Call CopyRwabs32DLL
-
- [CopyAvparamDLL]
- IsCurrentFileOlder bOlderFile = AVPARAM.DLL
- ContinueIf OldFileExists
- IsFileLocked bLocked = AVPARAM.DLL
- ContinueIf FileIsNotLocked
- CopyFileAs AVPARAM.DLL = AVPARAM.DLL
-
- [CopyRwabs16DLL]
- ContinueIf PlatformWin32_9XCheck
- IsCurrentFileOlder bOlderFile = RWABS16.DLL
- ContinueIf OldFileExists
- CopyFileAs RWABS16.DLL = RWABS16.DLL
-
- [CopyRwabs32DLL]
- ContinueIf PlatformWin32_9XCheck
- IsCurrentFileOlder bOlderFile = RWABS32.DLL
- ContinueIf OldFileExists
- CopyFileAs RWABS32.DLL = RWABS32.DLL
-
- [CopyPsapiDLL]
- ContinueIf PlatformWin32_NTCheck
- ContinueIf EngineIs4050OrGreater
- GetSystemDir szSysDir
- SetWorkDir szSysDir
- FileExists bFound = PSAPI.DLL
- ContinueIf NotFoundCheck
- CopyFileAs PSAPI.DLL = PSAPI.DLL
-
- [OldFileExists]
- return bOlderFile == TRUE | bForceUpdate == TRUE
-
- [EngineIs4050OrGreater]
- return NTEngineVersion >= 4050
-
- [FileIsNotLocked]
- return bLocked == FALSE
-
- [CopyCommandLineFiles]
- InstallFiles Engine32Section
- InstallFiles CommandLineSection
- Call FindViruFile
- SetFinalStatusFlag bStatus = 0
- Set bSectionUpdated = TRUE
-
- [FindViruFile]
- FileExists bFound = FINDVIRU.EXE
- ContinueIf FoundCheck
- InstallFiles FindViruSection
-
- [CopySdatPackFile]
- ContinueIf CheckProductUpdated
- InstallFiles SdatPackFile
-
- [CheckProductUpdated]
- return bStatus == 0
-
- [CheckProductNotUpdated]
- return bStatus == 1 | bStatus == 2 | bStatus == 3 | bStatus == 4 | bStatus == 5 | bStatus == 6 | bStatus == 7
-
- [CheckSectionUpdated]
- Return bSectionUpdated == TRUE
-
- [DatSection]
- File SCAN.DAT
- File NAMES.DAT
- File CLEAN.DAT
-
- [InterNetDAT]
- CopyFileAs Internet.DAT = Internet.DAT
-
- [VXD403Section]
- File MCSCAN32.VXD
- File VSHIELD.VXD
-
- [VXD450Section]
- File MCSCAN32.VXD
-
- [Engine32Section]
- File MCSCAN32.DLL
- CopyFileAs SIGNLIC.TXT = SIGNLIC.TXT
-
- [EngineDats]
- File LICENSE.DAT
- File MESSAGES.DAT
-
- [CommandLineSection]
- File SCAN.EXE
- File SCANPM.EXE
- CopyFileAs MCTOOL.EXE = MCTOOL.EXE
- CopyFileAs SIGNLIC.TXT = SIGNLIC.TXT
-
- [SdatPackFile]
- CopyFileAs SDATPACK.LST = SDATPACK.LST
-
- [FindViruSection]
- CopyFileAs SCAN.EXE = FindViru.EXE
-